/*jshint esversion: 6 */
import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);

// import {isPc} from "@/common/OtherTools";

const routes = [
    {
        path:'/',
        name:'index',
    },
];

const router = new VueRouter({
    mode: 'history',
    routes,
});

//导航守卫
router.beforeEach((to, from, next) => {
    next();
});
// router.beforeEach((to, from, next) => {
//     if(to.path == '/'){
//         if(isPc()){
//             next();
//         }else{
//             next('/m');
//         }
//     }else if(to.path.indexOf('mine')!=-1){
//         if(store.state.user.token){
//             next();
//         }else{
//             next('/');
//         }
//     }else{
//         next();
//     }
// });

export default router;
